01: /*
02: * SSHTools - Java SSH2 API
03: *
04: * Copyright (C) 2002-2003 Lee David Painter and Contributors.
05: *
06: * Contributions made by:
07: *
08: * Brett Smith
09: * Richard Pernavas
10: * Erwin Bolwidt
11: *
12: * This program is free software; you can redistribute it and/or
13: * modify it under the terms of the GNU General Public License
14: * as published by the Free Software Foundation; either version 2
15: * of the License, or (at your option) any later version.
16: *
17: * This program is distributed in the hope that it will be useful,
18: * but WITHOUT ANY WARRANTY; without even the implied warranty of
19: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20: * GNU General Public License for more details.
21: *
22: * You should have received a copy of the GNU General Public License
23: * along with this program; if not, write to the Free Software
24: * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
25: */
26: package com.sshtools.j2ssh.transport.hmac;
27:
28: import com.sshtools.j2ssh.transport.AlgorithmInitializationException;
29:
30: /**
31: *
32: *
33: * @author $author$
34: * @version $Revision: 1.16 $
35: */
36: public interface SshHmac {
37: /**
38: *
39: *
40: * @return
41: */
42: public int getMacLength();
43:
44: /**
45: *
46: *
47: * @param sequenceNo
48: * @param data
49: * @param offset
50: * @param len
51: *
52: * @return
53: */
54: public byte[] generate(long sequenceNo, byte[] data, int offset,
55: int len);
56:
57: /**
58: *
59: *
60: * @param keydata
61: *
62: * @throws AlgorithmInitializationException
63: */
64: public void init(byte[] keydata)
65: throws AlgorithmInitializationException;
66:
67: /**
68: *
69: *
70: * @param sequenceNo
71: * @param data
72: *
73: * @return
74: */
75: public boolean verify(long sequenceNo, byte[] data);
76: }
|