索引
- PersistentCategoryKeyValueContent
- ITreeContent
- ItemContent
- InstantaneousTreeContent
- ICodedTreeContent
- IKeyValueContent
- InstantaneousCodedTreeContent
- InstantaneousKeyValueContent
- IGlobalizationContent
- EntityUtil
- EntityStore
- ICategoryTreeContent
- ICategoryKeyValueContent
- ICodedCategoryTreeContent
- EntityJoin
- EntityCapsule
- CacheKeyValueContent
- CacheTreeContent
- ClassContent
- ProxySupport
- CacheCodedTreeContent
- Business
- ValidationSupport
- Validation
- IFinallyAspect
- Intercept
- InvokeContext
- IProxyLoader
- ProxyFactory
- IAspect
- IAroundAspect
- FinallyAspectSupport
- AroundAspectSupport
- AOPUnknownBreak
- AOPBreak
- AOPTransactionBreak
- GridView
- JSONOut
- Galleria
- package-frame
- package-summary
- package-tree
- package-use
- LoginSessionListener
- ApplicationContextListener
- TransactionFilter
- FileUploader.FileUploaderStatus
- FileUploader
- CharacterEncodingFilter
- ImageRedirectFilter
- FileUploader.FileUploaderListener
- PrintWriterDecorator
- IFormatter
- TokenPool
- HttpServletResponseDecorator
- HttpServletRequestDecorator
- ICryptography
- DynamicSecret
- CryptographySupport
- OrmTransactionContext
- OrmPersistenceFactory
- OrmPersistenceCollection
- CryptographyFactory
- OrmContexts
- OrmDatabaseTransaction
- OrmDefinitionContext
- OrmManipulationQueryContext
- OrmPersistence
- IOrmPersistence
- IOrmManipulationQuery
- IOrmTransaction
- Order
- OrmConstant
- IOrmDefinition
- DatabaseHelperSupport
- Entity
- FieldProperty
- Fields
- XMLFormatter
- SetList
- AggregateField
- Condition
- DatabaseHelper
- JSONFormatter
- ISetList
- MapList
- Names
- NameValue
- ServiceRouter
- StreamView
- TextView
- XMLView
- IMapList
- ServiceController
- RouterSupport
- Router
- RedirectView
- MVCRenderException
- MVCNotFoundException
- MVCInternalException
- JSPRouter
- JSPView
- Model
- MVCException
- MVCInstantiationException
- IModel
- IRouter
- IView
- JSONView
- JSPController
- ImageView
- IController
- HTMLView
- ForwardView
- Controller
- MailSender
- RandomGenerator
- ReflectionUtil
- ReservedWord
- QRCode
- LoggerSupport
- ChinesePinYin
- HttpExecuter
- IdCardValidator
- ImageValidateCode
- User32.RECT
- User32.SIZE
- KCLInformation
- IAppender
- Logger
- User32.POINT
- User32
- Identify
- FacadeDirectory
- FacadeIO
- TextReader
- TextWriter
- LocalizationLanguage
- Convert
- Comments
- WinFormInstallationBuilder
- WebFormInstallationBuilder
- PersistentTreeContent
- ServiceBusiness
- TreeContent
- CallingOnly
- CodeBuilder
- PersistentCategoryTreeContent
- PersistentCodedCategoryTreeContent
- PersistentCodedTreeContent
- PersistentGlobalizationContent
- PersistentKeyValueContent
- XMLDocumentEx
- WxOAuthAdapter
- WxPayAdapter
- WxSupport
- KCLConfig
- XMLDocument
- WxOAthAdapter
- WxAdapterSupport
- WxBasicAdapter
- WxMenuAdapter
- WxMessageDispatcher
- IWxReceivedListener
- TreeNode
- TreeLeaf
- Tree
- Train
- IWxEventListener
- ITreeNode
- MapQueue
- DateTime
- Forest
- ICache
- IMapQueue
- ThreadUnsafe
- UnimplementedException
- Untested
- ThreadSafe
- Cache
- MultiThreadUnitTest
- Debugger
- IUnitTest
- UnitTest
- Tested
- UploadView
- TreeView
- Paging
- StringHelper
- RichText
- Video
- Music
- ListView
- Label
- KCLTag
com.knots.kcl.misc
Class IdCardValidator
java.lang.Object com.knots.kcl.misc.IdCardValidator
public class IdCardValidator
- extends java.lang.Object
公民身份号码是特征组合码,由十七位数字本体码和一位数字校验码组成。 排列顺序从左至右依次为:六位数字地址码,八位数字出生日期码,三位数字顺序码和一位数字校验码。 (1) 身份证前6位为行政区划数字代码(简称数字码)说明(参考《GB/T 2260-2007 中华人民共和国行政区划代码》): (2) 该数字码的编制原则和结构分析,它采用三层六位层次码结构,按层次分别表示我国各省(自治区,直辖市,特别行政区)、 市(地区,自治州,盟)、县(自治县、县级市、旗、自治旗、市辖区、林区、特区)。 (3) 数字码码位结构从左至右的含义是: 第一层为两位代码表示省、自治区、直辖市、特别行政区; 第二层为两位代码表示市、地区、自治州、盟、直辖市所辖市辖区、县汇总码、省(自治区)直辖县级行政区划汇总码,其中: 第三层为两位表示县、自治县、县级市、旗、自治旗、市辖区、林区、特区。 第四层为八位的出生日期。 第五层为两位表示所在派出所代码。 第六层为一位表示性别,奇数表示男性,偶数表示女性。 第七层为校检码:计算方法为:将前面的身份证号码17位数分别乘以不同的系数。 从第一位到第十七位的系数分别为:7 9 10 5 8 4 2 1 6 3 7 9 10 5 8 4 2。 将这17位数字和系数相乘的结果相加。 用加出来和除以11,看余数是多少。 余数只可能有0 1 2 3 4 5 6 7 8 9 10这11个数字。其分别对应的最后一位身份证的号码为1 0 X 9 8 7 6 5 4 3 2。
Constructor Summary | |
---|---|
IdCardValidator() |
Method Summary | |
---|---|
static boolean | is15Idcard(java.lang.String idcard) 15位身份证号码的基本数字和位数验校 |
static boolean | is18Idcard(java.lang.String idcard) 18位身份证号码的基本数字和位数验校 |
static int | isLongIdNumberCorrent(java.lang.String cardNumber) |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
IdCardValidator
public IdCardValidator()
Method Detail |
---|
is15Idcard
public static boolean is15Idcard(java.lang.String idcard)
- 15位身份证号码的基本数字和位数验校
is18Idcard
public static boolean is18Idcard(java.lang.String idcard)
- 18位身份证号码的基本数字和位数验校
isLongIdNumberCorrent
public static int isLongIdNumberCorrent(java.lang.String cardNumber)