github.com/shogo82148/std@v1.22.1-0.20240327122250-4e474527810c/crypto/aes/cipher.go (about)

     1  // Copyright 2009 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package aes
     6  
     7  import (
     8  	"github.com/shogo82148/std/crypto/cipher"
     9  )
    10  
    11  // AESのブロックサイズ(バイト単位)。
    12  const BlockSize = 16
    13  
    14  type KeySizeError int
    15  
    16  func (k KeySizeError) Error() string
    17  
    18  // NewCipherは新しい [cipher.Block] を作成して返します。
    19  // key引数はAESキーである必要があります。
    20  // AES-128、AES-192、またはAES-256を選択するために、
    21  // 16バイト、24バイト、または32バイトのいずれかを指定します。
    22  func NewCipher(key []byte) (cipher.Block, error)