github.com/shogo82148/std@v1.22.1-0.20240327122250-4e474527810c/crypto/des/cipher.go (about) 1 // Copyright 2011 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 des 6 7 import ( 8 "github.com/shogo82148/std/crypto/cipher" 9 ) 10 11 // DESのブロックサイズ(単位はバイト)。 12 const BlockSize = 8 13 14 type KeySizeError int 15 16 func (k KeySizeError) Error() string 17 18 // NewCipherは新しい [cipher.Block] を作成して返します。 19 func NewCipher(key []byte) (cipher.Block, error) 20 21 // NewTripleDESCipher は新しい [cipher.Block] を作成して返します。 22 func NewTripleDESCipher(key []byte) (cipher.Block, error)