internal: incomplete vault systems behind feature flag (#2340)
This commit is contained in:
@@ -158,8 +158,39 @@ export default class FakeWebCrypto {
|
||||
return data.message
|
||||
}
|
||||
|
||||
sodiumCryptoBoxGenerateKeypair() {
|
||||
return { publicKey: this.randomString(64), privateKey: this.randomString(64), keyType: 'x25519' }
|
||||
sodiumCryptoSign(message, secretKey) {
|
||||
const data = {
|
||||
message,
|
||||
secretKey,
|
||||
}
|
||||
return btoa(JSON.stringify(data))
|
||||
}
|
||||
|
||||
sodiumCryptoKdfDeriveFromKey(key, subkeyNumber, subkeyLength, context) {
|
||||
return btoa(key + subkeyNumber + subkeyLength + context)
|
||||
}
|
||||
|
||||
sodiumCryptoGenericHash(message, key) {
|
||||
return btoa(message + key)
|
||||
}
|
||||
|
||||
sodiumCryptoSignVerify(message, signature, publicKey) {
|
||||
return true
|
||||
}
|
||||
|
||||
sodiumCryptoBoxSeedKeypair(seed) {
|
||||
return {
|
||||
privateKey: seed,
|
||||
publicKey: seed,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
sodiumCryptoSignSeedKeypair(seed) {
|
||||
return {
|
||||
privateKey: seed,
|
||||
publicKey: seed,
|
||||
}
|
||||
}
|
||||
|
||||
generateOtpSecret() {
|
||||
|
||||
Reference in New Issue
Block a user