MCPcopy Create free account
hub / github.com/mikro-orm/mikro-orm / decrypt

Function decrypt

tests/features/result-cache/GH7112.test.ts:11–16  ·  view source on GitHub ↗
(value: string)

Source from the content-addressed store, hash-verified

9}
10
11function decrypt(value: string): string {
12 if (!value.startsWith('enc:')) {
13 throw new Error(`Cannot decrypt value that is not encrypted: ${value}`);
14 }
15 return value.slice(4);
16}
17
18class EncryptedType extends Type<string, string> {
19 convertToDatabaseValue(value: string): string {

Callers 1

convertToJSValueMethod · 0.85

Calls 1

sliceMethod · 0.80

Tested by

no test coverage detected