subtle.go raw

   1  package subtle
   2  
   3  // AES-CBC via SubtleCrypto and crypto.getRandomValues.
   4  // Available in both window and service worker scopes.
   5  
   6  // RandomBytes fills dst with cryptographically random bytes.
   7  func RandomBytes(dst []byte) { panic("jsbridge") }
   8  
   9  // AESCBCEncrypt encrypts plaintext with AES-256-CBC.
  10  // key: 32 bytes, iv: 16 bytes.
  11  // Calls fn with the ciphertext when done.
  12  func AESCBCEncrypt(key, iv, plaintext []byte, fn func([]byte)) { panic("jsbridge") }
  13  
  14  // AESCBCDecrypt decrypts ciphertext with AES-256-CBC.
  15  // key: 32 bytes, iv: 16 bytes.
  16  // Calls fn with the plaintext when done.
  17  func AESCBCDecrypt(key, iv, ciphertext []byte, fn func([]byte)) { panic("jsbridge") }
  18